<?php

namespace App\Observers;

use App\Models\User;

class UserObserver
{

    public function created(User $user) {
        if (empty($user->image)) {
            $num = random_int(1,11);
            $user->image = "http://loadmore.cn/images/$num.png";
        }
    }
}
